home *** CD-ROM | disk | FTP | other *** search
- /** NETSTAT.C - Fetches novell network name with novell calls **/
-
- #include "stdio.h"
- #include "dos.h"
-
- /** Novell Variable length call buffers **/
- char tx[300], rx[300];
-
- main()
- {
- int wind; /* window id number */
- char string[100]; /* string to print in window */
-
- tx[0] = 1; /* set for 1 byte */
- tx[1] = 0; /* second byte of buffer length */
- tx[2] = 17; /* set command into buffer */
-
- rx[0] = 255; /* set return length */
- rx[1] = 0;
-
- log_request(&tx, &rx); /* call novell */
-
- color(0,3);
- wind=open_window(5,20,19,60); /* open up window */
- locate_window(wind,1,1); /* position cursor */
- print_window(wind,"Novell File Server Status (AHA 8508.27)");
- locate_window(wind,2,0); /* position cursor */
- print_window(wind,"╟───────────────────────────────────────");
- locate(7,60); /* position cursor */
- place(182);
-
- locate_window(wind,3,12); /* position cursor */
- sprintf(string,"Server Name: %s", &rx[2]);
- print_window(wind,string);
-
- locate_window(wind,5,10); /* position cursor */
- sprintf(string,"Software Version: %d.%d",rx[50],rx[51]);
- print_window(wind,string);
-
- locate_window(wind,7,8); /* position cursor */
- sprintf(string,"Allowable connections: %d",rx[53]);
- print_window(wind,string);
-
- locate_window(wind,9,10); /* position cursor */
- sprintf(string,"Connections in use: %d",rx[55]);
- print_window(wind,string);
-
- locate_window(wind,11,6); /* position cursor */
- sprintf(string,"Maximum Allowable volumes: %d",rx[57]);
- print_window(wind,string);
-
- locate_window(wind,13,12); /* position cursor */
- print_window(wind,"(Press any key)");
-
- getch();
- close_window(wind);
- }
- log_request(transmit, recieve)
- int transmit,recieve;
- {
- int *inxptr;
- union REGS inregs, outregs;
- struct SREGS segreg;
- char *incptr;
- segread(&segreg);
- inxptr = &segreg.es;
- *inxptr = segreg.ds;
- inxptr = &inregs.x.si;
- *inxptr = transmit;
- inxptr = &inregs.x.di;
- *inxptr = recieve;
- incptr = &inregs.h.ah;
- *incptr = '\xe3';
- intdosx(&inregs, &outregs ,&segreg);
- }